<?php

/**
 * Company form.
 *
 * @package    maximous
 * @subpackage form
 * @author     Mina.Gerges.Wadea
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class CompanyForm extends BaseCompanyForm
{

    public function configure()
    {
        $_i18n = $this->getOption('i18n');
        $this->setWidget('logo', new sfWidgetFormInputFileEditable(array('file_src'  => false,
                    'is_image'  => true,
                    'edit_mode' => !$this->isNew(),
                    'template'  => ' %input% <br />' . $_i18n->__('available types jpg ,png ,jpeg , gif') . '<br />%delete% %delete_label%'
                )));
        $this->setValidator('logo', new sfValidatorFile(array(
                    'mime_types' => sfConfig::get('app_images_mime_types'),
                    'required'   => FALSE,
                    'path'       => sfConfig::get('sf_root_dir') . '/' . sfConfig::get('app_dir_company_images'))));
        $this->useFields(array('name','description','email','phone','mobile','logo','user_id','need_check','statues'));
        $this->configureLoginUserRoleOnChangeStatusAndNeedCheck();
        $this->addFormatter('CustomFormatter');
    }

}
